package cn.zyq.demo.system.common;

import cn.zyq.demo.system.config.consts.system.SystemConfig;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Transient;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class BaseBean implements Serializable {
    /**
     * 业务id，uuid类型，用于详情查询
     */
    @Column(name = "`serviceID`")
    @ApiModelProperty(value = "业务id，用于查看详情", required = true)
    private String serviceID;
    /**
     * 表记录创建时间
     */
    @ApiModelProperty(hidden = true)
    @Column(name = "`createTime`")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 表记录最后一次更新时间
     */
    @ApiModelProperty(hidden = true)
    @Column(name = "`updateTime`")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    /**
     * 0正常，1删除
     */
    @ApiModelProperty(hidden = true)
    @Column(name = "`deleted`")
    private Integer deleted;
    /**
     * 记录创建人id， 0默认值
     */
    @ApiModelProperty(hidden = true)
    @Column(name = "`createBy`")
    private Integer createBy;
    /**
     * 记录更新人id（最后一次），0默认值
     */
    @ApiModelProperty(hidden = true)
    @Column(name = "`updateBy`")
    private Integer updateBy;
    //
    // @Transient
    // private String fileHostName = SystemConfig.fileHostname;
}
